home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Views / Standard Views / ProgressWindow.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  811 b   |  36 lines  |  [TEXT/CWIE]

  1. // ProgressWindow.cp
  2.  
  3. #ifndef ProgressWindow_h
  4. #include "ProgressWindow.h"
  5. #endif
  6. #ifndef ContextMaintainer_h
  7. #include "ContextMaintainer.h"
  8. #endif
  9. #ifndef WindowDefinition_h
  10. #include "WindowDefinition.h"
  11. #endif
  12.  
  13. ProgressWindow *NewProgressWindow( const WindowInitializer& initializer,
  14.                                               const Progress& progress )
  15.   {
  16.     ContextMaintainer cm( 0 );
  17.     return new ProgressWindow( initializer, progress );
  18.   }
  19.  
  20. ProgressWindow::ProgressWindow( const WindowInitializer& initializer,
  21.                                           const Progress& progress )
  22.   : Window( WindowDefinition::Document() ),
  23.      root( Focus() ),
  24.      bar( progress ),
  25.      right( Focus() ),
  26.      bottom( Focus() )
  27.   {
  28.     root.Main().SetView( bar );
  29.     root.Bottom().SetView( bottom );
  30.     root.Right().SetView( right );
  31.     
  32.     RootPane().SetView( root );
  33.     
  34.     Initialize( initializer );
  35.   }
  36.